import java.util.Arrays;

public class SortTest {
    public static void toString(int[] array) {
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i] +" ");
        }
        System.out.println();
    }
    public static void main(String[] args) {
        int[] array = {6,1,2,7,9,4,5,10,8,3};
        int[] array1 = {6,1,2,7,9,4,5,10,8,3};
        int[] array2 = {6,1,2,7,9,4,5,10,8,3};
        int[] array3 = {6,1,2,7,9,4,5,10,8,3};
        int[] array4 = {6,1,2,7,9,4,5,10,8,3};
        int[] array5 = {6,1,2,7,9,4,5,10,8,3};
        int[] array6 = {6,1,2,7,9,4,5,10,8,3};
        Sort sort = new Sort();
        sort.insertSort(array);
        System.out.println("插入排序");
        toString(array);
        sort.shellSort(array1);
        System.out.println("希尔排序");
        toString(array1);
        sort.bubbleSort(array2);
        System.out.println("冒泡排序");
        toString(array2);
        sort.selectSort(array3);
        System.out.println("选择排序");
        toString(array3);
        sort.quickSort(array4);
        System.out.println("快速排序");
        toString(array4);
        sort.margeSort(array5);
        System.out.println("归并排序");
        toString(array5);
    }
}